package com.zxj.schoolxianyu.service;

import com.zxj.schoolxianyu.dao.goodsDao;
import com.zxj.schoolxianyu.entity.goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class addGoodsService {

    @Autowired(required = false)
    private goodsDao goodsDao;

    public String addGoods(goods g) {
        java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
        g.updatetime = currentDate;
        System.out.println(g);
        goodsDao.insert(g);
        return "success";
    }
}